<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
    ul{
        list-style: none;
    }
    ul li{
        float: left;
        margin: 20px;
    }
    ul li img{
        width: 300px;
        height: 170px;
    }
    </style>
</head>
<body>
<div title="我是div" id="box">11111111111</div>
<ul>
    <li><img src="img/1.jpg" alt=""></li>
    <li><img src="img/2.jpg" alt=""></li>
    <li><img src="img/3.jpg" alt=""></li>
    <li><img src="img/4.jpg" alt=""></li>
</ul>
<script src="js/jquery-3.6.0.min.js"></script>
<script>
$(function(){
    $("ul li").hover(function(e){
        var src=$(this).find("img").attr("src");
        $("body").append("<div id='pic'><img src='"+src+"'></div>");
        $("#pic").css({
            "position":"absolute",
            "left":e.pageX+10,
            "top":e.pageY+10,
        })
    },function(){
        $("#pic").remove();
    })
    $("ul li").mousemove(function(e){
        $("#pic").css({
            "position":"absolute",
            "left":e.pageX+10,
            "top":e.pageY+10,
        })
    })
   
})
</script>
</body>
</html>